login_status = 0 # 当变量值为1时代表登录
user = "xiaoming"
passwd = "123456"
bar = '''
1、查看信息
2、编辑信息
3、登录
4、退出
'''
while True:
    print(bar)
    result = input('请输入你的操作指令：')
    if result == "1":
        if login_status == 1:
            print('金币：10000')
            print('等级：30')
        else:
            print("未登录，请先登录")
    elif result == "2":
        if login_status == 1:
            print('修改信息')
        else:
            print("未登录，请先登录")
    elif result == "3":
        input_user,input_passwd = input("请输入你的账号："),input("请输入你的密码：")
        if input_user == user and input_passwd == passwd:
            print("登录成功")
            login_status = 1
    elif result == "4":
        break